<template>
  <div id="wealthList">
    <NavBar class="nav" title="理财产品" />
    <div class="lckf" @click="to('/financialTradeList')">委托订单</div>
    <div class="topBox">
      <img class="topImg" src="../../assets/images/movebricks_bg.png" alt="" />
      <div class="head-pro-title">
        <p>正在托管的资金</p>
        <div>1000000.00<span>USDT</span></div>
      </div>
      <div class="wealth-main">
        <div class="boxflex" v-for="item in money" :key="item.txt">
          <div>{{ item.number }}</div>
          <div>{{ item.txt }}</div>
        </div>
      </div>
    </div>
    <div class="pos-box">
      <wealthListCom v-for="item in 10" :key="item" @click.native="to('/wealthOpen')" />
    </div>
  </div>
</template>

<script>
import NavBar from '@/components/navbar'
import wealthListCom from '@/components/wealthListCom'

export default {
  components: {
    NavBar,
    wealthListCom,
  },
  data() {
    return {
      money: [
        {
          number: 231,
          txt: '预计今日收益'
        },
        {
          number: 231.1,
          txt: '累计收益'
        },
        {
          number: 231.2,
          txt: '托管中的订单'
        }
      ]
    }
  },
  methods: {
    //跳转页面
    to(to) {
      this.$router.push({ path: to })
    }
  }
}
</script>

<style lang="less" scoped>
#wealthList {
  .nav {
    position: fixed;
    z-index: 0;
    top: 0;
    width: 100%;
    z-index: 99;
  }
  .lckf {
    position: fixed;
    right: -10px;
    top: 80px;
    border-radius: 50px;
    z-index: 99;
    text-align: center;
    background: #d5e7ff;
    color: #5a8af8;
    padding: 5px 10px;
    width: 100px;
    line-height: 24px;
    margin: 10px auto;
    font-size: 16px;
  }
  .topBox {
    margin-top: 46px;
    position: relative;
    color: #fff;
    .topImg {
      position: absolute;
      top: 0;
      width: 100vw;
      z-index: -1;
    }
    .head-pro-title {
      height: 125px;
      padding-left: 20px;
      text-align: left;
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: flex-start;
      p {
        font-size: 16px;
      }
      div {
        font-size: 32px;
        font-weight: 700;
        span {
          font-size: 20px;
          padding-left: 4px;
        }
      }
    }
    .wealth-main {
      display: flex;
      justify-content: space-between;
      background-color: hsla(0, 0%, 100%, 0.2);
      padding: 15px;
      margin-bottom: 10px;
      .boxflex {
        width: 33.3%;
        display: flex;
        flex-direction: column;
        div:nth-child(1) {
          font-weight: 700;
          margin-bottom: 5px;
          font-size: 16px;
        }
      }
    }
  }
  .pos-box {
    background: #f7f6fb;
    min-height: calc(100vh - 270px);
    padding: 10px;
  }
}
</style>
